The present invention relates to techniques for generating executable code from common source code.
A key question in the design of a hosted-business application architecture is where the complex business logic will reside. In traditional client-server systems, this logic is coded in the business-logic layer to be deployed/executed on the server, as opposed to in the user-interface layer to be deployed/executed on a remote machine, such as a client. While this architecture is safe and easy to maintain, system performance and the user-experience can be poor because any calculation requires a server request, which can increase the server load and often has an associated delay between the time the user requests a result and receives the answer.
A wide variety of approaches are used to address these challenges in existing systems. For example, some approaches, such as Asynchronous JavaScript™ with XML (AJAX), allow small amounts of data to be retrieved from the server to update the user interface at the client (for example, a portion of web page in a web browser) without refreshing the entire web page. This approach offers the feel of a desktop application. However, it may still be subject to delays between the time the user requests and receives a bit of information, and it can increase the server load because a server request occurs even though the user may not always realize it.
In another approach, business logic is duplicated in the user-interface layer, for example, JavaScript™, that is sent to a web browser to be executed on the client. This approach can provide improved responsiveness (and, thus, an improved user experience) and may reduce server load. However, it can give rise to software bugs because the business logic is coded at two places, and in the event of changes to the software it can be difficult to coordinate changes to both instances of the business logic.
Alternatively, in some applications large pieces of business logic may be pushed to the client when an application is first used, and then updated periodically thereafter. This approach can provide good responsiveness and may reduce the server load. However, the initial download experience may be frustrating for users. Moreover, maintaining an up-to-date version of the application on the client can be difficult.